package com.itc.system.api.factory;

import com.itc.common.core.domain.R;
import com.itc.system.api.RemoteSystemService;
import com.itc.system.api.domain.SysDept;
import com.itc.system.api.domain.SysUser;
import com.itc.system.api.domain.dto.SysDeptCheckDto;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public class RemoteSystemFallbackFactory implements FallbackFactory<RemoteSystemService> {
    private static final Logger log = LoggerFactory.getLogger(RemoteSystemFallbackFactory.class);

    @Override
    public RemoteSystemService create(Throwable throwable)
    {
        log.error("部门服务调用失败:{}", throwable.getMessage());
        return new RemoteSystemService()
        {


            @Override
            public Boolean biDeptCheck(SysDeptCheckDto dto) {
                return false;
            }

            @Override
            public List<SysDept> getSysDeptList(String deptId) {
                return null;
            }

            @Override
            public SysDept getDeptById(Long deptId) {
                return null;
            }


            @Override
            public SysUser
            getSysUser(Long userId) {
                return null;
            }

            @Override
            public List<SysDept> getDeptChildById(String deptChildId) {
                return null;
            }


            @Override
            public R<List<SysDept>> getAllDeptName(SysDept sysDept) {
                return null;
            }

            @Override
            public R<List<SysDept>> getSeatListByDeptId(SysDeptCheckDto sysDept) {
                return null;
            }


        };
    }
}
